home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / EleOfC++ vrs 0.1 / TextEdit / TScrollDoc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-14  |  2.0 KB  |  86 lines  |  [TEXT/KAHL]

  1. /*
  2. ** This is the TDoc class declaration.  This class is an adaptation of 
  3. ** the class of the same name in the book, Elements of C++ Macintosh 
  4. ** Programming, by Dan Weston.
  5. **
  6. ** Copyright © 1991 Mark Gross (gross@kaman.com and
  7. ** RR2, Box 84, Clayville, NY 13322);         
  8. ** this file may be published everywhere, but no charge
  9. ** may be made for its use.  Please contact me about any bugs found.
  10. ** I'm also looking for Macintosh development work, so drop me a line
  11. ** if you think I could help.  
  12. **    
  13. */
  14.  
  15. #define _H_TScrollDoc
  16.  
  17. #include    "TDoc.h"
  18.  
  19.  
  20. struct    TScrollDoc:TDoc
  21. {
  22.  
  23.     ControlHandle    fHorizScrollBar;
  24.     ControlHandle    fVertScrollBar;
  25.     short            fVOffset;
  26.     short            fHOffset;
  27.     
  28.     
  29. /*
  30. ** begining of member functions
  31. */
  32.     ControlHandle    GetVScroll(void);
  33.     ControlHandle    GetHScroll(void);
  34.     
  35.     
  36.     TDoc* Init(OSType theCreator, SFReply *SFInfor);
  37.     void        Delete(void);
  38.     
  39.     Boolean    InitDoc(void);
  40.     void    GetContentRect(Rect *r);
  41.     
  42.     short    GetVertSize(void);
  43.     short    GetHorizSize(void);
  44.     
  45.     short    GetVertLineScrollAmount(void);
  46.     short    GetHorizLineScrollAmount(void);
  47.     
  48.     short    GetVertPageScrollAmount(void);
  49.     short    GetHorizPageScrollAmount(void);
  50.     
  51.     void    FocusOnContent(void);
  52.     void    FocusOnWindow(void);
  53.     
  54.     void    SizeScrollBars(void);
  55.     void    AdjustScrollBars(void);
  56.     void    SetScrollBarValues(void);
  57.     void    SynchScrollBars(void);
  58.     
  59.     void    Activate(void);
  60.     void    Deactivate(void);
  61.     
  62.     void    DoTheUpdate(EventRecord *theEvent);
  63.     
  64.     void    DoContent(EventRecord *theEvent);
  65.     void    ScrollClick(EventRecord *theEvent);
  66.     
  67.     void    DoGrow(EventRecord *theEvent);
  68.     void    DoZoom(short partCode);
  69.     
  70.     void    ScrollContents(short dh, short dv);
  71.     void    Scroll(ControlHandle theControl, short change);
  72.     
  73.     void    DoThumbScroll(ControlHandle theControl, Point localPt);
  74.     
  75.     void    DoPageScroll(ControlHandle theControl, short part);
  76.     void    DoButtonScroll(ControlHandle theControl, Point localPt);
  77.     
  78.     void    ContentClick(EventRecord *theEvent);
  79.     
  80.         
  81. };/*end of class decloration*/
  82.     
  83.     
  84. extern TScrollDoc *gCurrScrollDoc;
  85. pascal void ActionProc(ControlHandle theControl, short partCont);
  86.